<?php

$t_data = IsPage($GL, $_GET['page']);
if ($t_data) {
    if ($_POST["check_yes"] != "yes") {
        $t_tpl = GetTpl("accept");
        $msg = "Удалить страницу <b>" . $t_data["title"] . "</b>?";
        $t_tpl = str_replace("{msg}", $msg, $t_tpl);
        $t_title = "Удаление страницы";
        $HEADER .=" - ".$t_title;
        $t_BODY = $t_tpl;
    }
    else {
        DelPage($GL, $_GET['page']);
        Logger($LogFile, "ADMIN DEL PAGE (http://" . $SITE . "/?action=a" . $t_data["link"] .")");
        header("Location: http://" . $SITE . "/?action=addpage");
    }
}
else {
     header("Location: http://" . $SITE . "/");
}

?>
